﻿using JESAI.Biz.Data.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JESAI.Application.Abstractions.Admin.Dtos.Menu
{
    public class MenuDto
    {
        /// <summary>
        /// 编号
        /// </summary>
        public int Id { get; set; }
        /// <summary>
        /// 平台编号
        /// </summary>
        public int PlatformId { get; set; }
        /// <summary>
        /// 父编号
        /// </summary>
        public int ParentId { get; set; }
        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 图标
        /// </summary>
        public string Icon { get; set; }
        /// <summary>
        /// 地址
        /// </summary>
        public string LinkUrl { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        public int SortId { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        public int State { get; set; }
        /// <summary>
        /// 跳转
        /// </summary>
        public string Redirect { get; set; }
        /// <summary>
        /// Key
        /// </summary>
        public string Key { get; set; }
        /// <summary>
        /// 组件
        /// </summary>
        public string Component { get; set; }
        /// <summary>
        /// 保持打开
        /// </summary>
        public bool KeepAlive { get; set; }
        /// <summary>
        /// 类型
        /// </summary>
        public MenuType MenuType { get; set; }

        /// <summary>
        /// 按钮方法
        /// </summary>
        public string BtnMethod { get; set; }

        /// <summary>
        /// 按钮标识
        /// </summary>
        public string BtnMark { get; set; }

        /// <summary>
        /// 按钮类型
        /// </summary>
        public string BtnType { get; set; }

        /// <summary>
        /// 按钮样式
        /// </summary>
        public string BtnStyle { get; set; }

        /// <summary>
        /// 按钮属性
        /// </summary>
        public string BtnAttr { get; set; }

        /// <summary>
        /// 是否单选
        /// </summary>
        public bool SingleSelected { get; set; }
    }

    public class MenuTreeDto : MenuDto
    {
        [Newtonsoft.Json.JsonProperty(PropertyName = "children")]
        public List<MenuTreeDto> Children { get; set; }
    }
}
